﻿using Comm.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Comm.Web.Action
{
    /// <summary>
    /// OrderManager 的摘要说明
    /// </summary>
    public class OrderManager : BaseHander
    {
        BLL.OrdersService bllorder = new BLL.OrdersService();
        public override void SonLoad()
        {
            string type = context.Request.Params["type"];
            switch (type)
            {
                case "order":
                    ManageOrder();
                    break;
            }
        }

        public void ManageOrder() 
        {
            string orderId = Request.Form["orderId"];
            int count = bllorder.Update1(orderId);
            if (count > 0)
            {

                AjaxMsgHelper.AjaxMsg("ok", "状态修改成功！~~~", JsonHelper.Serialize(true));
            }
            else
            {
                AjaxMsgHelper.AjaxMsg("err", "状态修改失败！~~~");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}